<?php $this->load->view('scenic/layout/header') ?>
<header class="sec-head flex">
    <div class="sec-return">
         <a href="javascript:goHistoryBack('<?php echo site_url('scenic/home/index');?>');">
            <i class="iconfont">&#xe606;</i>
        </a>
    </div>
    <div class="pay-name">订单填写</div>
    <div class="pay-option flex">
        <a href="<?php echo site_url() ?>">
            <i class="iconfont">&#xe605;</i>
        </a>
        <a href="tel:400-0571-648">
            <i class="iconfont pay-phone">&#xe61d;</i>
        </a>
    </div>
</header>
<section class="pay-text widthMax pay-order-scenic">
    <div class="pay-safe am-animation-slide-top">
        <i class="iconfont">&#xe61c;</i>您正在安全支付环境中,请放心付款
    </div>
    <form action="<?php echo site_url('scenic/payment/orderToPay'); ?>" method="post">
        <input type="hidden" name="pay_id" value="<?php echo $payRecord->pay_id ?>">
        <input type="hidden" name="balance_pay" value="<?php echo $balance_pay ?>">
        <input type="hidden" name="order_bouns" value="<?php echo $order_bouns ?>">
        <div class="pay-ol pay-hidden">
            <ul class="pay-list">
                <?php foreach ($orderBase as $item) :?>
                <li>
                    <p class="flex-1"><?php echo $item->goods_name ?></p>
                    <i>￥<?php echo $item->price ?><span>X</span><?php echo $item->number ?></i>
                </li>
                <?php endforeach;?>
            </ul>
            <div class="pay-more"></div>
            <?php if ($order_bouns > 0) : ?>
                <div class="pay-you">积分已抵扣：<span>￥<?php echo $order_bouns ?></span></div>
            <?php endif;?>
            <div class="pay-total flex">
                <div class="pay-price flex-1">应付总额：<i><span>￥</span><?php echo $balance_pay ?></i></div>
                <div class="pay-stop flex">
                    <p class="flex-1">收起</p>
                    <i class="iconfont">&#xe606;</i>
                </div>
                <?php if (count($orderBase) > 1) :?>
                <div class="pay-open flex">
                    <p class="flex-1">展开</p>
                    <i class="iconfont">&#xe606;</i>
                </div>
                <?php endif;?>
            </div>
        </div>
        <dl class="pay-mode">
            <dt>支付方式</dt>
            <dd <?php if ($payBank == 99) :?>class="active"<?php endif;?>>
                <input type="radio" name="pay_bank" value="99" class="pay-radio" <?php if ($payBank == 99) :?>checked="checked"<?php endif;?>>
                <div class="pay-icon flex flex-1">
                    <div class="pay-img pay-bz"></div>
                    <p class="flex-1">余额支付</p>
                </div>
                <i class="mode-icon iconfont">&#xe6701;</i>
                <i class="mode-true iconfont">&#xe702;</i>
            </dd>

            <?php if (!validateWeiXin()) :?>
                <dd <?php if ($payBank == 1) :?>class="active"<?php endif;?>>
                    <input type="radio" name="pay_bank" value="1" class="pay-radio" <?php if ($payBank == 1) :?>checked="checked"<?php endif;?>>
                    <div class="pay-icon flex flex-1">
                        <div class="pay-img">
                            <i class="pay-zfb iconfont">&#xe61e;</i>
                        </div>
                        <p class="flex-1">支付宝支付</p>
                    </div>
                    <i class="mode-icon iconfont">&#xe6701;</i>
                    <i class="mode-true iconfont">&#xe702;</i>
                </dd>
            <?php else : ?>
                <dd <?php if ($payBank == 201) :?>class="active"<?php endif;?>>
                    <input type="radio" name="pay_bank" value="201" class="pay-radio" <?php if ($payBank == 201) :?>checked="checked"<?php endif;?>>
                    <div class="pay-icon flex flex-1">
                        <div class="pay-img">
                            <i class="pay-wx iconfont">&#xe61f;</i>
                        </div>
                        <p class="flex-1">微信支付</p>
                    </div>
                    <i class="mode-icon iconfont">&#xe6701;</i>
                    <i class="mode-true iconfont">&#xe702;</i>
                </dd>
            <?php endif;?>
            <dd <?php if ($payBank == 200) :?>class="active"<?php endif;?>>
                <input type="radio" name="pay_bank" value="200" class="pay-radio" <?php if ($payBank == 200) :?>checked="checked"<?php endif;?>>
                <div class="pay-icon flex flex-1">
                    <div class="pay-img pay-yl"></div>
                    <p class="flex-1">银联支付</p>
                </div>
                <i class="mode-icon iconfont">&#xe6701;</i>
                <i class="mode-true iconfont">&#xe702;</i>
            </dd>

            <?php if ( !empty($is_scan)) : ?>
            <dd <?php if ($payBank == 210) :?>class="active"<?php endif;?>>
                <input type="radio" name="pay_bank" value="210" class="pay-radio" <?php if ($payBank == 210) :?>checked="checked"<?php endif;?>>
                <div class="pay-icon flex flex-1">
                    <div class="pay-img pay-ccb"></div>
                    <p class="flex-1">建设支付</p>
                </div>
                <i class="mode-icon iconfont">&#xe6701;</i>
                <i class="mode-true iconfont">&#xe702;</i>
            </dd>
            <?php endif; ?>

        </dl>
        <div class="pay-button">
            <button type="submit">确定支付</button>
        </div>
    </form>
</section>